import numpy as np
'''
x+2y-z = 2
2x-3y+2z = 2
3x+y-z = 2
求解三元一次方程
'''
A = np.array([[1, 2, -1],
             [2, -3, 2],
             [3, 1, -1]])

b = np.array([2, 2, 2])

v = np.linalg.solve(A, b)

print("The solution vector is")
print(v)